Skip to content

Privacy follow-up: no entry date in story events, no Nextcloud server in error messages - #753

Merged
theachoem merged 1 commit into
developfrom
752-analytics-date-nextcloud-errors
Nov 9, 2026
Merged

theachoem merged 1 commit into
developfrom
752-analytics-date-nextcloud-errors

Conversation

@theachoem

@theachoem theachoem commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #750, for the points raised in #752.

What we confirmed

Point in #752 Confirmed Fixed here
1. No in-app opt-out for Analytics/Crashlytics ✅ No, by decision (see below)
2. Story events send the entry's year/month/day, which goes beyond "counts and categories" ✅ ✅ date removed
3. A Nextcloud server's hostname can reach Crashlytics through exception text ✅ ✅ error text reduced to its kind
Also found: a failed background sync writes result.error?.message to Crashlytics logs (backup_provider.dart), so the same hostname could leak on any failed Nextcloud sync, not only in Cloud Optimize ✅ ✅ same fix

1. Opt-out

Not planned for now. Analytics only counts feature usage and carries no personal information (see #750 for the rules every event follows). This is covered by the privacy policy and terms on storypad.me.

2. Story events

storyAnalyticParameters no longer sends the entry's date. Story events now send only counts and flags about the entry, such as page and tag counts or whether it's starred or pinned, and never its date, text or location. The full list is in storyAnalyticParameters, and a test checks the exclusions.

3. Nextcloud errors in Crashlytics

Verified against the locked versions (dio 5.11.1, webdav_client 1.2.2):

  • On a failed connection, Dio wraps the SocketException and includes its text. Dart's socket errors name the server: Failed host lookup: 'cloud.example.com', or address = …, port = ….
  • NextcloudCloudService._buildException put that text into NetworkException/ServiceException messages.
  • Those messages reach FirebaseCrashlytics.instance.log from Cloud Optimize ($e) and from the sync-failure log in BackupProvider. The logs are uploaded with the next crash report in the same session.

The new NextcloudCloudService.describeError() keeps only the kind of error, e.g. DioException(connectionError, SocketException(errno 8)) or DioException(badResponse, status 502). All three _buildException messages and the connect() failure use it. The fix is in the service itself, so every place that logs or shows these messages is covered. Google Drive and Dropbox are unchanged: their hosts are fixed, not the user's own.

Changes

  • base_analytics_event_adaptor.dart: drop year, month and day from storyAnalyticParameters, and add a comment stating the rule.
  • analytics_service.dart: the header rule now also lists "an entry's date".
  • nextcloud_cloud_service.dart: new describeError(), used in place of the raw $error/$e in exception messages.
  • Tests:
    • storyAnalyticParameters sends no date, title, text or place, and still sends the counts.
    • describeError drops the host, IP and path for DNS failures, refused connections and bad responses, and keeps the status code and errno. One test first checks that the raw Dio text does contain the host, so the test can't pass by accident.

Docs (docs/app/architecture/initialization.md in the monorepo) are updated alongside.

Test plan

  • dart analyze: no issues
  • flutter test test/core/services/analytics test/core/services/nextcloud_cloud_service_test.dart: all pass
  • Nextcloud connected with an unreachable server (e.g. Wi-Fi off) → sync fails as before and shows the same "no internet" state

Closes #752

🤖 Generated with Claude Code

… in error messages

- storyAnalyticParameters no longer sends the entry's year/month/day.
- NextcloudCloudService.describeError keeps only the kind of error (Dio type,
  status code, OS errno) in exception messages; the raw Dio/socket text names
  the user's own server and those messages reach Crashlytics breadcrumb logs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@theachoem theachoem added the bug Something isn't working label Nov 9, 2026
@theachoem theachoem self-assigned this Nov 9, 2026
@theachoem
theachoem merged commit cffda48 into develop Nov 9, 2026
1 check passed
@theachoem
theachoem deleted the 752-analytics-date-nextcloud-errors branch November 9, 2026 15:34
@theachoem theachoem added the community Contributions for/by community label Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working community Contributions for/by community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow-up to #750: opt-out, story-event wording, and a Crashlytics question

1 participant